import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
/** router*/
import router from './router'
app.use(router)

/** piana*/
import store, { registerStore } from '@/stores';
app.use(store)
registerStore()

/** element*/
import ElementPlus from 'element-plus'
import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言
import 'element-plus/dist/index.css'
app.use(ElementPlus, {
    locale: locale,
    size: 'default'
})
/** 路由守卫*/
import './permission'

/** svg图标*/
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon'

/** 组件*/
import hTable from '@/components/HTable'
import Pagination from '@/components/Pagination'

app.component('svg-icon', SvgIcon)
app.component('h-table', hTable)
app.component('Pagination', Pagination)


/** 全局方法挂载 */
import api from "@/api";
import http from "@/utils/http";
import utils from "@/utils";

app.config.globalProperties.$A = api
app.config.globalProperties.$H = http
app.config.globalProperties.$U = utils

app.mount('#app')
